<?php
/**
 * Created by God-Jie. 2017/3/3
 * Ajax传输数据
 */

    $file = file_get_contents("../data.txt","r");
    $arr = explode("\n",trim($file));

        if ($_GET["id"] == "len"){
            echo count($arr);
        }else{
            $id = (int)$_GET["id"];
            echo $arr[$id];
        }



